<ion-view view-title="消费记录"  hide-tabs="true" >
    <ion-header-bar align-title="center" class="bar-positive" id="bor">
        <div class="buttons">
            <button class="button-go-back" ng-click="goback()"><i class="icon ion-chevron-left"></i></button>
        </div>
        <h1 class="title">线下消费记录</h1>
    </ion-header-bar> 
    
    <div class="bar bar-subheader row coupon_tabs" style="padding:0;">
        <div ng-class={'col-50':true,'select':select} ng-click="tabs(0)">已完成订单</div>
        <div ng-class={'col-50':true,'select':unselect} ng-click="tabs(1)">异常订单</div>
    </div>
    <ion-content   class="has-subheader APP_BG_color " style="padding-bottom:10px;" id="consume">
        <ul class="_lists">
            <!-- 正常订单模板                                                      ui-sref="tab.consume_del({id:item.out_trade_no})"                        -->
            <li class="_list" ng-repeat="item in consumption_list" ng-if="select" ui-sref="tab.store_del({gid:item.orderNo,mid:item.mallId})">
                <div class="top">
                    <img ng-src="img/icons/order_icon.png" alt="logo"><span class="shop_name">{{item.shoppeName}}</span>
                    <span class="right state_1">
                        {{item.status}}
                    </span>
                </div>
                <p class="mid">
                    <span class="name">{{item.goods[0].goodsName}}</span>
                    <span class="number right"> x {{item.goods[0].goodsCount}}</span>
                </p>
                <p class="bot">
                    <span class="time">{{item.payTime}}</span>
                    <span class="pay right">实际支付：
                        {{item.payPrice}}
                    </span>
                </p>
            </li>
            <!-- 坏订单模板 -->
            <li class="_list" ng-repeat="x in bad_data" ng-if="unselect"  ui-sref="tab.store_del({goodid:x.orderNo,mallid:x.mallId})">
                <div class="top">
                    <img ng-src="img/icons/order_icon.png" alt="logo"><span class="shop_name">{{x.shoppeName}}</span>
                    <span class="right state_0"> {{x.status}}</span>
                </div>
                <p class="mid">
                    <span class="name">{{x.goods[0].goodsName}}</span>
                    <span class="number right"> x {{x.goods[0].goodsCount}}</span>
                </p>
                <p class="bot">
                    <span class="time">{{x.payTime}}</span>
                    <span class="pay right">实际支付： {{x.payPrice}}</span>
                </p>
            </li>
        </ul>
        <div ng-if="nomoreData" class="nomoreData">没有更多数据了~</div>
        <ion-infinite-scroll ng-if="moredata" on-infinite="loadMore()" immediate-check="false"
                        distance="10%"></ion-infinite-scroll>
    </ion-content>
    <!-- <ion-tabs class="tabs-positive tabs-striped tabs-top">   
        <ion-tab title="已完成订单" >  
            <ion-view id="consume_1">  
                <ion-content class="APP_BG_color">  
                    <ul class="_lists">
                        <li class="_list" ng-repeat=" item in data" ui-sref="tab.consume_del">
                            <div class="top">
                                <img ng-src="img/icons/order_icon.png" alt="logo"><span class="shop_name">{{item.shop_name}}</span>
                                <span class="right state_1">
                                    {{item.status | order_status}}
                                </span>
                            </div>
                            <p class="mid">
                                <span class="name">{{item.trade_name}}</span>
                                <span class="number right">{{item.trade_num | number}}</span>
                            </p>
                            <p class="bot">
                                <span class="time">{{item.createtime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                                <span class="pay right">实际支付：
                                    {{item.total_amount}}
                                </span>
                            </p>
                        </li>
                    </ul>
                    <div ng-if="nomoreData" class="nomoreData">没有更多数据了~</div>
                    <ion-infinite-scroll ng-if="moreDatasucc" on-infinite="loadMoreSucc()" immediate-check="false"
                        distance="10%"></ion-infinite-scroll>
                </ion-content>  
            </ion-view>  
        </ion-tab>  
        <ion-tab title="异常订单">  
            <ion-view id="consume_0">  
                <ion-content class="APP_BG_color">
                    <ul class="_lists">
                        <li class="_list" ng-repeat="x in bad_data"  ui-sref="tab.consume_del">
                            <div class="top">
                                <img ng-src="img/icons/order_icon.png" alt="logo"><span class="shop_name">{{x.shop_name}}</span>
                                <span class="right state_0"> {{x.status | order_status}}</span>
                            </div>
                            <p class="mid">
                                <span class="name">{{x.trade_name}}</span>
                                <span class="number right">{{x.trade_num | number}}</span>
                            </p>
                            <p class="bot">
                                <span class="time">{{x.createtime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                                <span class="pay right">实际支付： {{x.total_amount}}</span>
                            </p>
                        </li>
                    </ul>
                    <div ng-if="nomoreData_Bad" class="nomoreData">没有更多数据了~</div>
                     <ion-infinite-scroll ng-if="moreDatabad" on-infinite="loadMoreBad()" immediate-check="false"
                        distance="10%"></ion-infinite-scroll>
                </ion-content>
            </ion-view>  
        </ion-tab>  
    </ion-tabs>   -->
</ion-view>